package com.dementors.base;

import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

/**
 * ***********************
 * author:Administrator
 * <p/>
 * time:2015/12/3.
 * <p/>
 * name:
 * <p/>
 * step:
 */
public class SpaceItemDecoration extends RecyclerView.ItemDecoration {
    private int space;

    public SpaceItemDecoration(int space) {
        this.space = space;
    }

    @Override
    public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
        outRect.left = space;
        outRect.right = space;
        outRect.bottom = space;

        //改成使用上面的间隔来设置

        outRect.top = space;
    }

}
